package io.geekidea.boot.common;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Entity基类
 */
@Getter
@Setter
@NoArgsConstructor
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8",shape = JsonFormat.Shape.STRING)
    @TableField("createdTime")
    private LocalDateTime createdTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8",shape = JsonFormat.Shape.STRING)
    @TableField("updatedTime")
    private LocalDateTime updatedTime;

    /**
     *  逻辑删除标识【逻辑已删除值1、逻辑未删除值0】
     */
    @TableLogic(value = "0",delval = "1")
    @TableField("deleted")
    private String deleted;
    /**
     * 创建人
     */
    @TableField(value = "createdBy")
    private String createdBy;

    @TableField("updatedBy")
    private String updatedBy;






}
